<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<#include "/template/header.ftl">
<script type="text/javascript">
//插入数据
insert_click=function(event) {
	document.getElementById("insertCmd").value="insert";
	return insert_click_base(event,"${base}/station");
};
update_data=function(id) {
	document.getElementById("cmd").value="update";
	return update_data_base(id,"${base}/station");
};
//查看数据
detail_data=function(id) {
	document.getElementById("cmd").value="detail";
	return detail_data_base(id,"${base}/station");
};
//删除数据
delete_click=function(event){
	document.getElementById("cmd").value="deleteAll";
	return delete_click_base(event,"${base}/station");
};
delete_data=function(id){
	document.getElementById("cmd").value="delete";
	return delete_data_base(id,"${base}/station");
};
//禁用，启用数据
disable_data=function(id,enable){
	document.getElementById("cmd").value="disable";
	return disable_data_base(id,enable,"${base}/station");
};
//查询
search_click=function(event){
	document.getElementById("cmd").value="search";
	return search_click_base(event,"${base}/station");
};
$(document).ready(function(){
	$("#view\\.searchName").focus(function(){ 
		  $("#view\\.searchName").val($("#view\\.searchName").val());
	});
	$("#view\\.searchName").focus();
});
</script>
</head>
<body>
<form id="insertForm" action="${base}/station" method="post">
	<input type="hidden" name="cmd" id="insertCmd" value="insert" />
</form>
<form id="listForm" action="${base}/station">
<input type="hidden" name="cmd" id="cmd" value="search" />
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
		<td height="30">
			<#include "/template/listSearchTitle.ftl">
		</td>
	</tr>
	<tr>
		<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td width="9" style="background-image:url(/template/images/tab_12.gif);">&nbsp;</td>
					<td>
						<table>
							<tr>
								<td align="right" width="80px">名称：</td>
								<td>
									<input type="text" id="view.searchName" name="view.searchName" value="${view.searchName}" />
								</td>
								<td align="right" width="80px">编码：</td>
								<td>
									<input type="text" id="view.searchCode" name="view.searchCode" value="${view.searchCode}"/>
								</td>
							</tr>
							<tr>
								<td align="right">状态：</td>
								<td>
									<select id="view.searchState" name="view.searchState">
										<option value="">请选择</option>
										<#list view.stateMap?keys as stateKey>
										<#if stateKey==view.searchState>
											<option selected value="${stateKey}">${view.stateMap[stateKey]}</option>
										 <#else>
										 	<option value="${stateKey}">${view.stateMap[stateKey]}</option>
										 </#if>
										</#list>
									</select>
								</td>
								<td align="right" colspan="2">
									<a href="javascript:void(0);" onclick="search_click();">
										查询<img src="/template/images/a1.gif" width="14" height="14" border="0" />
									</a>
								</td>
							</tr>
						</table>
					</td>
					<td width="9"  style="background-image:url(/template/images/tab_16.gif);"></td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td width="9" style="background-image:url(/template/images/tab_20.gif);"></td>
					<td style="background-image:url(/template/images/tab_21.gif);">&nbsp;</td>
					<td width="14"><img src="/template/images/tab_22.gif" width="14"/></td>
				</tr>
			</table>
		</td>
	</tr>
</table>

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
		<td height="30px">
			<#include "/template/listDataTopTitle.ftl">
		</td>
	</tr>
	<tr>
		<td>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td class="list_left_border">&nbsp;</td>
				<td>
				<table class="list_title">
					<tr class="listTdTitle">
						<td>选择</td>
						<td>编码</td>
						<td>名称</td>
						<td>状态</td>
						<td>编辑/查看</td>
						<td>删除/启用禁用</td>
					</tr>
					<#list view.result as result>
						<tr class="listTd">
							<td><input type="checkbox" name="checked" /><input type="hidden" name="id_list" value="${result.id}" /></td>
							<td>${result.code!""}</td>
							<td>${result.name!""}</td>
							<td>${view.stateMap[result.state]}</td>
							<td><#include "/template/listEditButton.ftl"></td>
							<td><#include "/template/listDeleteButton.ftl"></td>
						</tr>
					</#list>
				</table>
				</td>
				<td width="9" style="background-image:url(/template/images/tab_16.gif);">&nbsp;</td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td height="29">
			<#include "/template/listbottom.ftl">
		</td>
	</tr>
</table>
</form>
</body>
</html>